A semiconductor device such as a metal oxide semiconductor field effect transistor (MOSFET) has a diode embedded therein in some cases. While the MOSFET is in an off state, for example, a current flows in a forward direction of the embedded diode. When a reverse voltage is applied to the diode, electrons accumulated in the diode are discharged to a drain electrode, and holes are discharged to a source electrode. The state in which previously accumulated charge carriers are discharged from the diode is referred to as a reverse recovery state. In the reverse recovery state, a current flows due to the carriers being discharged. When a density of a current flowing is high in the semiconductor device, a breakdown of the semiconductor device may occur in some cases.